<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>人员管理</title>
    <link rel="stylesheet" href="../layui/css/layui.css"/>
    <link rel="stylesheet" href="../font-awesome-4.7.0/css/font-awesome.min.css">

</head>
<body>
<div><h2>人员管理</h2></div>
<div>
    <div id="topbar">
        <button type="button" onclick="showWorkModel()" class="layui-btn layui-btn-normal"><i class="fa fa-plus"></i>添加员工</button>
        <button type="button" onclick="deleteWork()" class="layui-btn layui-btn-danger"><i class="fa fa-remove"></i>删除员工</button>
        <button type="button" onclick="editWork()" class="layui-btn layui-btn-normal"><i class="fa fa-edit"></i>修改信息</button>
        <div class="layui-input-inline">
            <input type="text" name="searchWorkName" class="layui-input" placeholder="请输入员工姓名" autocomplete="off" class="layui-input" style="margin-left: 40px;width: 200px; margin-right: 0px">
        </div>
        <button class="layui-btn" onclick="searchWork()"><i class="fa fa-search"></i></button>
    </div>
</div>

<div id="addWorkModel" style="display: none">
    <form id="addUserForm" class="layui-form layui-form-pane">
        <div class="layui-form-item" pane>
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="WorkName" required  lay-verify="checkBuilding" placeholder="请输入姓名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <select id="WorkSex" name="WorkSex">
                    <option>男</option>
                    <option>女</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">住址</label>
            <div class="layui-input-block">
                <input type="text" name="WorkAddr" required  lay-verify="checkBuilding" placeholder="请输入住址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">联系方式</label>
            <div class="layui-input-block">
                <input type="text" name="WorkNum" required  lay-verify="checkBuilding" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" align="center">
            <button class="layui-btn" lay-submit lay-filter="addWorkBtn">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>
</div>
<div id="editWorkModel" style="display: none">
    <form id="editWorkForm" class="layui-form layui-form-pane">
        <input type="hidden" name="workId"/>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="workName" required  lay-verify="checkWorkName" placeholder="请输入姓名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="text" name="workSex" required  lay-verify="checkWorkSex" placeholder="请输入性别" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" name="workAddr" required  lay-verify="checkWorkAddr" placeholder="请输入地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input type="text" name="workNum" required  lay-verify="checkWorkNum" placeholder="请输入电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" align="center">
            <button class="layui-btn" lay-submit lay-filter="updateWorkBtn">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>

</div>
<div>
    <table id="demo" lay-filter="test"></table>
</div>
</body>
<script src="../layui/layui.all.js"></script>
<script src="../js/userStorage.js"></script>
</html>